<!DOCTYPE html>
<html xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <title>任务管理 </title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap -->
    <link rel="stylesheet" href="../../css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="../../css/font-awesome.min.css">
    <link rel="stylesheet" href="../../plugins/jqgrid/ui.jqgrid-bootstrap.css">
    <link rel="stylesheet" href="../../plugins/bootstrap-validator/dist/css/bootstrapValidator.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="../../css/AdminLTE.min.css">
    <link rel="stylesheet" href="../../plugins/ztree/css/metroStyle/metroStyle.css">
    <link rel="stylesheet" href="../../css/main.css">
    <style>
        .dropdown .btn {
            position: relative;
            width: 100%;
            text-align: left;
        }

        .dropdown .btn:after {
            position: absolute;
            content: '';
            display: inline-block;
            width: 0;
            height: 0;
            right: 2px;
            top: 50%;
            transform: translateY(-50%);
            margin-left: 2px;
            vertical-align: middle;
            border-top: 4px dashed;
            border-top: 4px solid \9;
            border-right: 4px solid transparent;
            border-left: 4px solid transparent;
        }

        #jqGrid .checkbox {
            margin-top: 4px;
        }
    </style>
    <script src="../../libs/jquery.min.js"></script>
    <script src="../../plugins/layer/layer.js"></script>
    <script src="../../libs/bootstrap.min.js"></script>
    <script src="../../plugins/bootstrap-validator/dist/js/bootstrapValidator.min.js"></script>
    <script src="../../libs/vue.min.js"></script>
    <script src="../../plugins/jqgrid/grid.locale-cn.js"></script>
    <script src="../../plugins/jqgrid/jquery.jqGrid.min.js"></script>
    <script src="../../plugins/ztree/jquery.ztree.all.min.js"></script>
    <script src="../../js/common.js"></script>
</head>
<body class="page-wrapper">
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="row">
            <div class="col-xs-12">
                <div class="box box-primary">
                    <div class="box-body">
                        <div class="grid-btn">
                            <a v-if="hasPermission('generator:basetaskinfo:save')" class="btn btn-primary" @click="add"><i
                                    class="fa fa-plus"></i>&nbsp;新增</a>
                            <a v-if="hasPermission('generator:basetaskinfo:update')" class="btn btn-primary"
                               @click="update"><i
                                    class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
                            <a v-if="hasPermission('generator:basetaskinfo:delete')" class="btn btn-primary"
                               @click="del"><i
                                    class="fa fa-trash-o"></i>&nbsp;删除</a>
                        </div>
                        <table id="jqGrid"></table>
                        <div id="jqGridPager"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="row">
            <div class="col-xs-12">
                <div class="box box-primary">
                    <div class="box-body">
                        <div class="panel-heading">{{title}}</div>
                        <form class="form-horizontal" id="task-form">
                            <div class="form-group">
                                <div class="col-sm-2 control-label">任务名称</div>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" v-model="baseTaskInfo.taskName"
                                           placeholder="任务名称" name="taskName"/>
                                </div>
                            </div>
                            <!--<div class="form-group">
                                <div class="col-sm-2 control-label">工期类型</div>
                                <div class="col-sm-10">
                                    <select class="form-control" v-model="baseTaskInfo.durationType"
                                            name="durationType">
                                        <option v-for="(item,index) in durationTypeList" :value="item.typeCode">
                                            {{item.typeLabel}}
                                        </option>
                                    </select>
                                </div>
                            </div>-->

                            <div class="form-group">
                                <div class="col-sm-2 control-label">工期要求</div>
                                <div class="col-sm-10">
                                    <input type="number" class="form-control" v-model="baseTaskInfo.durationRequire"
                                           placeholder="请输入天数" name="durationRequire" oninput = "value=value.replace(/[^\d]/g,'')"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-2 control-label">阶段名称</div>
                                <div class="col-sm-10">
                                    <select class="form-control" v-model="baseTaskInfo.phaseId" name="phase">
                                        <option v-for="(item,index) in phaseList" :value="item.id">{{item.phaseName}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-2 control-label"></div>
                                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="../../js/modules/base/basetaskinfo.js"></script>
</body>
</html>